/**
 * Changes text in element when it's selected|unselected
 */
$.fn.textSwitcher = function(params){
	params = (params != undefined)? params:{};	
	var options = {};
	
	options.inactiveText  = (params.inactiveText != undefined)? params.inactiveText:'Inactive text';
	options.activeText    = (params.activeText != undefined)? params.activeText:'';
	
	return this.each(function(){
		var e = $(this);
		if($.trim(e.val()) == ''){
			e.val(options.inactiveText);
		};
		e.focus(function(){
            if(e.val() == options.inactiveText){
                e.val(options.activeText);
            }
        });
        e.blur(function(){
            if(e.val() == options.activeText){
                e.val(options.inactiveText);
            }
        });
	});
};
